﻿using System;
using System.Linq;
using System.ComponentModel;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.IO.IsolatedStorage;
using System.Runtime.Serialization;

namespace SBPweb.RIA.Client.Contracts.Base
{

    [CollectionDataContract]
    public class SiteLocalCache : LocalStoreBase<SiteLocalCache, SiteLocalCacheFormatter>
    {

        #region Constructor logic

        static SiteLocalCache()
        {
            FileName = "SiteCache.xml";
            Scope = StorageScopes.Site;
        }

        public SiteLocalCache()
            : base()
        {
        }

        public SiteLocalCache(IEnumerable<KeyValuePair<string, object>> keyValues)
            : base(keyValues)
        {
        }

        #endregion
        
    }

    public class SiteLocalCacheFormatter : LocalStoreFormatterBase
    {

        public override IsolatedStorageFileStream DecodeIsoStream(IsolatedStorageFileStream isoStream)
        {
            return isoStream;
        }

        public override IsolatedStorageFileStream EncodeIsoStream(IsolatedStorageFileStream isoStream)
        {
            return isoStream;
        }

    }

}